package com.shop.front.vo.store;

import com.alibaba.fastjson.annotation.JSONField;
import com.shop.jpa.domain.BaseDomain;
import com.shop.util.IdSignUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;

@ApiModel("CollectProductVo 商品收藏")
@Data
public class CollectProductVo extends BaseDomain implements Serializable {

    @ApiModelProperty(value = "id", hidden = true)
    @Id
    @JSONField(serialize=false)
    private Long id;

    @ApiModelProperty(value = "product_id", hidden = true)
    @Column(name = "product_id")
    @JSONField(serialize=false)
    private Long productId;


    /**
     * 商品名称
     */
    @ApiModelProperty("商品名称")
    @Column(name = "store_name")
    private String storeName;

    /**
     * 商品简介
     */
    @ApiModelProperty("商品简介")
    @Column(name = "store_info")
    private String storeInfo;





    /**
     * 属性金额
     */
    @ApiModelProperty("属性金额")
    @Column(name = "price")
    private BigDecimal price;





    /**
     * 图片
     */
    @ApiModelProperty("图片")
    @Column(name = "image")
    private String image;


    @ApiModelProperty("产品ID")
    @Transient
    private String productSign;
    public String getProductSign() {
        return IdSignUtil.doSign(this.productId);
    }


}
